Skip to content

Add macOS compatibility: GPU, OAuth login, Cmd shortcuts, build#23

Open
jonathondouglasyager-debug wants to merge 3 commits intoAnRkey:mainfrom
jonathondouglasyager-debug:main
Open

Add macOS compatibility: GPU, OAuth login, Cmd shortcuts, build#23
jonathondouglasyager-debug wants to merge 3 commits intoAnRkey:mainfrom
jonathondouglasyager-debug:main

Conversation

@jonathondouglasyager-debug
Copy link

@jonathondouglasyager-debug jonathondouglasyager-debug commented Mar 10, 2026

Summary

  • Fix GPU detection for macOS — macOS uses Metal, not Linux-style /dev/nvidia0 or /dev/dri/card0. Also fixes headless detection (DISPLAY/WAYLAND_DISPLAY don't exist on macOS/Windows, so the app was incorrectly flagging them as headless and disabling GPU acceleration).
  • Fix OAuth login on macOS (and likely other platforms) — Google/Apple sign-in popups were being blocked and loaded in the same tab, which breaks OAuth flows that depend on window.opener context. Now allows OAuth popups to open as real BrowserWindows with the shared persist:grok session, and auto-closes them when auth completes.
  • Set Chrome User-Agent on webview session — Electron's default UA includes "Electron" which some auth providers reject. Sets a standard Chrome UA on the persist:grok session so login pages work correctly.
  • Add Cmd (⌘) keyboard shortcuts for macOS — All shortcuts (new tab, tab switching, reload, search remap) now use Cmd on macOS instead of Ctrl.
  • Add macOS build target — Adds npm run build-mac script and mac config to electron-builder (produces .dmg).

Test plan

  • Verify npm start launches with "GPU acceleration enabled" on macOS
  • Verify sign-in with Google account works (popup opens, auth completes, popup closes)
  • Verify sign-in with Apple account works (no "something went wrong" error)
  • Verify Cmd+T opens new tab, Cmd+Tab cycles tabs, Cmd+R reloads on macOS
  • Verify existing Ctrl shortcuts still work on Windows/Linux (no regression)
  • Verify npm run build-mac produces a .dmg

Notes

Also noticed an unresolved merge conflict in README.md (lines 90-132 have <<<<<<< HEAD / >>>>>>> development markers) — didn't touch it since it's unrelated, but wanted to flag it.

🤖 Generated with Claude Code

…uild config

- Fix GPU detection to recognize macOS Metal GPU (was only checking Linux dev nodes)
- Fix headless detection to skip DISPLAY/WAYLAND check on macOS/Windows
- Set Chrome User-Agent on persist:grok session so OAuth providers don't reject Electron
- Allow Google/Apple OAuth popups to open as real BrowserWindows with shared session
- Auto-close OAuth popups when auth redirects back to grok.com
- Use Cmd (meta) instead of Ctrl for keyboard shortcuts on macOS
- Add mac build target (dmg) to package.json and electron-builder config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e field

- Resolved merge conflict markers in README.md (kept development branch's
  better-structured Building from Source section)
- Resolved merge conflict markers in .gitignore (combined both sides)
- Fixed package.json license from "ISC" to "GPL-2.0" to match LICENSE file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix documentation: resolve merge conflicts, correct license
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant